<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>404错误</title>
</head>
<body>
<h1 align="center" style="font-size: 36px">404错误</h1>
<div align="right" style="width: 70%;"><span>当前时间:</span><span id="app"></span></div>
</body>
<script>
    const app = document.getElementById("app");
    app.innerText = formatTime(new Date());
    setInterval(() => {
        app.innerText = formatTime(new Date());
    }, 1000)

    function formatTime (date) {
        const year = date.getFullYear()
        const month = date.getMonth() + 1
        const day = date.getDate()

        const hour = date.getHours()
        const minute = date.getMinutes()
        const second = date.getSeconds()

        const t1 = [year, month, day].map(formatNumber).join('/')
        const t2 = [hour, minute, second].map(formatNumber).join(':')

        return `${t1} ${t2}`
    }

    function formatNumber(n) {
        const str = n.toString()
        return str[1] ? str : `0${str}`
    }
</script>
</html>